import request from '@/utils/request'

// 查询通讯目录列表
export function listDirectory(query) {
    return request({
      url: '/fj/communicate_directory/list',
      method: 'get',
      params: query
    })
  }
  
  // 查询通讯目录详细
  export function getDirectory(id) {
    return request({
      url: '/fj/communicate_directory/' + id,
      method: 'get'
    })
  }
  
  // 新增通讯目录
  export function addDirectory(data) {
    return request({
      url: '/fj/communicate_directory',
      method: 'post',
      data: data
    })
  }
  
  // 修改通讯目录
  export function updateDirectory(data) {
    return request({
      url: '/fj/communicate_directory',
      method: 'put',
      data: data
    })
  }
  
  // 删除通讯目录
  export function delDirectory(id) {
    return request({
      url: '/fj/communicate_directory/' + id,
      method: 'delete'
    })
  }


  // 查询通讯录人员名单列表
export function listPerson(query) {
    return request({
      url: '/fj/communicate_person/list',
      method: 'get',
      params: query
    })
  }
  
  // 查询通讯录人员名单详细
  export function getPerson(id) {
    return request({
      url: '/fj/communicate_person/' + id,
      method: 'get'
    })
  }
  
  // 新增通讯录人员名单
  export function addPerson(data) {
    return request({
      url: '/fj/communicate_person',
      method: 'post',
      data: data
    })
  }
  
  // 修改通讯录人员名单
  export function updatePerson(data) {
    return request({
      url: '/fj/communicate_person',
      method: 'put',
      data: data
    })
  }
  
  // 删除通讯录人员名单
  export function delPerson(id) {
    return request({
      url: '/fj/communicate_person/' + id,
      method: 'delete'
    })
  }